package com.tencent.cloud.iov.util.crypt;

import org.spongycastle.crypto.agreement.srp.SRP6Client;

import java.math.BigInteger;

/**
 * @author vinsonhuang
 * @date 2018/8/25
 */
public class CustomSRPClient extends SRP6Client {

    public BigInteger generateA() {
        a = selectPrivateValue();
        A = g.modPow(a, N);
        return A;
    }

    public BigInteger generateClientCredentials(String data, String salt) {
        x = new BigInteger(BCrypt.hashpw(data, salt).getBytes());
        return x;
    }

}
